1. Field
The present disclosure relates to technology that monitors a program execution processing load in a computer device.
2. Background Art
In recent years, electric automobile use has been spreading rapidly. Also recent is the use, in an electric automobile, of a motor such as a 3-phase alternating current motor mounted as a power source, a drive device such as an inverter, which carries out drive control of the motor, and a host controller such as a VCU (Vehicle Control Unit), which communicates with and carries out control of the drive device. The host controller generates various kinds of command values, such as a torque command, to be provided to the drive device (for example, a value such as x[Nm] indicating the physical amount of output torque) in response to an operation by a driver. The drive device regulates alternating current power to be applied to the motor in accordance with a command value provided from the host controller. Therefore, cruise control of the electric automobile is realized. Also, the host controller acquires various kinds of data (for example, data representing current values of output torque, revolution speed (number of revolutions per unit time), or the like) stored in a memory of the drive device, and also executes a process of carrying out display control of various kinds of meter based on the data. Therefore, the driver can be made aware of the state of the vehicle.
The process of regulating the power to be applied to the motor in accordance with a command value provided from the host controller is realized by operating a CPU (Central Processing Unit, hereafter control unit) of the drive device in accordance with a control program installed in advance in the drive device. Verification of whether or not the processing load of each process executed in accordance with the control program comes within an assumed range is carried out in the development process of the control program. The length of execution time of each process (in other words, the length of the time of execution of the control program by the control unit, hereafter referred to simply as “execution time”), and the CPU occupation rate wherein the execution time of each process is converted into a ratio per unit time, are included as indices representing the processing load. This is because the higher the processing load becomes, the longer the execution time, and the higher the CPU occupation rate. For example, when using the execution time of each process as an index representing the processing load, the execution time is measured for each process using a hardware timer. Processes executed by the control unit in accordance with the control program are broadly divided into fixed-cycle processes executed cyclically at constant time intervals by a timer interrupt or the like, and irregular processes executed by irregularly occurring interrupts. When an interrupt by another process with a higher priority occurs, an accurate execution time of the interrupted process cannot be measured unless the execution time of the other process is subtracted from the time measured by the hardware timer. Therefore, various technologies that enable a program execution time to be accurately measured have been proposed. One example of which is found in JP-A-2003-288237 (US 2003/187612) and is a measurement method called a “stack method”.